package com.gxsyh.nantie.order.provider.service.impl;

import com.gxsyh.nantie.order.provider.domain.TbDepartmentOrder;

import javax.annotation.Resource;
import com.gxsyh.nantie.order.provider.mapper.TbDepartmentOrderMapper;
import com.gxsyh.nantie.order.provider.TbDepartmentOrderService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @email yom535@outlook.com
 * @author: 刘锋嘉(Liu Fengjia)
 * @date: 2020/2/26
 * @time: 09:13
 * @Description: 
 */
@Transactional
@Service(version = "1.0.0")
public class TbDepartmentOrderServiceImpl implements TbDepartmentOrderService{

    @Resource
    private TbDepartmentOrderMapper tbDepartmentOrderMapper;

    @Override
    public int insterDepartmentOrder(Long id,Long departmentId, Long orderId) {
        TbDepartmentOrder tbDepartmentOrder=new TbDepartmentOrder();
        tbDepartmentOrder.setId(id);
        tbDepartmentOrder.setOrderId(orderId);
        tbDepartmentOrder.setDepartmentId(departmentId);
        return tbDepartmentOrderMapper.insert(tbDepartmentOrder);
    }
}
